#include<scheme.h>
#include<scheme-private.h>
#include<dynload.h>
#include<math.h>
#include<windows.h>

#define DLLIMPORT __declspec (dllexport)

DLLIMPORT void init_math (scheme* sc);
extern void  addFuncsMATH(scheme *sc) ;
extern void  init_math(scheme *sc) ;
//SCHEME_EXPORT pointer scm_load_ext(scheme *sc, pointer arglist);

typedef struct {
	unsigned char data[16];
	unsigned char point[16];
	unsigned char symbol;
} BigNumber

pointer newBigNumber(scheme *sc, pointer args){
	int tmp = 0;
	BigNumber x;
	x.data={0};
	x.point={0};
	x.symbol=0;
  if(args!=sc->NIL) {
       if(is_number(pair_car(args))) {
            v=rvalue(pair_car(args));
            if(v >= 0){
            	x.symbol = 
            }
            return mk_real(sc,v*v);
       }
  }
  return sc->NIL;
}

void addFuncsMATH(scheme* sc){
   scheme_define (sc, sc->global_env,
				   mk_symbol (sc, "big-number?"),
				   mk_foreign_func (sc, square)) ;
				scheme_define (sc, 
				sc->global_env, 
				mk_symbol(sc,"new-big-number"), 
				mk_foreign_func(sc, show_args)); 
				   return; 
}


void init_math(scheme* sc){
   addFuncsMATH(sc);
				   /*sc->interface->scheme_define( 
		sc, 
		sc->global_env, 
		sc->interface->mk_symbol(sc,"square"), 
		sc->interface->mk_foreign_func(sc, square)); */
				   return; 
}

